#include <iostream>
using namespace std;

class T{
	public:
		T(int x){ a=x; b+=x; }
		static void display(T c)
		{
			cout << "a=" << c.a << "\t" << "b=" << c.b << endl;
		}
	private:
		int a;
		static int b;
};
int T::b=5;

class A
{
	public:
		A(){ cout << "1"; }
		~A(){ cout << "2";}
};
class B : public A
{
	public:
		B(){ cout << "3"; }
		~B(){ cout << "4"; }
};

int main()
{
	int x = 2, y =4, *p;
	p = &x;
	cout << *p << "";
	*p = x+1;
	p = &y;
	cout << *p << "";
	*p = y+2;
	cout << x << " " << y << endl;

	//B b;
	//T A(3), B(5);
	//T::display(A);
	//T::display(B);
    return 0;
}